<?php
include_once dirname(__FILE__) . "/common.php";

include_once dirname(__FILE__) . "/header.php";

if(!isset($_SESSION['login']['ID']))
{	// not logged in
	include_once dirname(__FILE__) . "/page/home.php";
}
elseif(isset($_SESSION['webshop']['ID']) && !empty($_SESSION['webshop']['ID']) && is_numeric($_SESSION['webshop']['ID']))
{
	// webshop selected
	if(!isset($_SESSION['menu']['page']))
		$_SESSION['menu']['page'] = 'profiel';
	switch($_SESSION['menu']['page'])
	{
		case 'datafeed':
			include_once dirname(__FILE__) . "/page/webshop/datafeed.php";
			break;
				 
		case 'producten':
			include_once "page/webshop/producten.php";
			break;
				
		case 'statestieken':
			include_once "page/webshop/statestieken.php";
			break;
				 
		case 'profiel':
			include_once "page/webshop/profiel.php";
			break;
			
			
			
				
		default:
			include_once "page/webshop.php";		
			break;
	}
}
else
{	// account overview
	include_once "page/overzicht.php";
}
include_once "footer.php";